projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d28981c
)
(regexp-opt-depth): Fix off-by-two error.
author
Stefan Monnier
<monnier@iro.umontreal.ca>
Wed, 28 Nov 2001 03:06:10 +0000
(
03:06
+0000)
committer
Stefan Monnier
<monnier@iro.umontreal.ca>
Wed, 28 Nov 2001 03:06:10 +0000
(
03:06
+0000)
lisp/emacs-lisp/regexp-opt.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/regexp-opt.el
b/lisp/emacs-lisp/regexp-opt.el
index b6fac1355c1c141ef24c8fd477051819d21902f1..894cc4c4be7f9fafadef957812223e3768b30e40 100644
(file)
--- a/
lisp/emacs-lisp/regexp-opt.el
+++ b/
lisp/emacs-lisp/regexp-opt.el
@@
-120,7
+120,9
@@
in REGEXP."
(let ((count 0) start)
(while (string-match "\\(\\`\\|[^\\]\\)\\\\\\(\\\\\\\\\\)*([^?]"
regexp start)
- (setq count (1+ count) start (match-end 0)))
+ (setq count (1+ count)
+ ;; Go back 2 chars (one for [^?] and one for [^\\]).
+ start (- (match-end 0) 2))
count)))
\f
;;; Workhorse functions.